package com.eci.common.asset.constant;

/**
  * 字符串常量类
 *
 */
public class StringConstant {
	
	
	/**
	 * JSON常量
	 */
	public static class Json {

		/** 空对象 */
		public static final String EMPTY_OBJECT = "{}";
		/** 空数组 */
		public static final String EMPTY_ARRAY = "[]";
		
	}
	

	/**
	 * 	数字常量
	 */
	public static class Number {

		public static final String ZERO = "0";
		public static final String ONE = "1";
		public static final String TWO = "2";
		public static final String THREE = "3";
		public static final String FOUR = "4";
		public static final String FIVE = "5";
		public static final String SIX = "6";
		public static final String SEVEN = "7";
		public static final String EIGHT = "8";
		public static final String NINE = "9";
		public static final String TEN = "10";
		public static final String TWENTY = "20";
 
	}
	
	/**
	 *	 小写字母常量
	 */
	public static class LowerLetter {

		public static final String A = "a";
		public static final String B = "b";
		public static final String C = "c";
		public static final String D = "d";
		public static final String E = "e";
		public static final String F = "f";
		public static final String G = "g";
		public static final String H = "h";
		public static final String I = "i";
		public static final String J = "j";
		public static final String K = "k";
		public static final String L = "l";
		public static final String M = "m";
		public static final String N = "n";
		public static final String O = "o";
		public static final String P = "p";
		public static final String Q = "q";
		public static final String R = "r";
		public static final String S = "s";
		public static final String T = "t";
		public static final String U = "u";
		public static final String V = "v";
		public static final String W = "w";
		public static final String X = "x";
		public static final String Y = "y";
		public static final String Z = "z";
 
	}
	
	/**
	 * 	大写字母常量
	 */
	public static class UpperLetter {

		public static final String A = "A";
		public static final String B = "B";
		public static final String C = "C";
		public static final String D = "D";
		public static final String E = "E";
		public static final String F = "F";
		public static final String G = "G";
		public static final String H = "H";
		public static final String I = "I";
		public static final String J = "J";
		public static final String K = "K";
		public static final String L = "L";
		public static final String M = "M";
		public static final String N = "N";
		public static final String O = "O";
		public static final String P = "P";
		public static final String Q = "Q";
		public static final String R = "R";
		public static final String S = "S";
		public static final String T = "T";
		public static final String U = "U";
		public static final String V = "V";
		public static final String W = "W";
		public static final String X = "X";
		public static final String Y = "Y";
		public static final String Z = "Z";
 
	}
	
	
	/**
	 *	 符号常量
	 */
	public static class Symbol {

		/** 空字符串 */
		public static final String BLANK = "";
		/** 空格 */
		public static final String SPACE = " ";
		/** 逗号 */
		public static final String COMMA = ",";
		/** 星号 */
		public static final String STAR  = "*";
		/** 分号 */
		public static final String SEMICOLON = ";"; 
		/** 斜杠 */
		public static final String SLASH = "/";
		/** 点 */
		public static final String POINT = ".";
		/** 问号 */
		public static final String QUESTION = "?"; 
		/** & 号 */
		public static final String AMPERSAND = "&"; 
		/** 等号 */
		public static final String EQUAL = "=";
		/** 横杠 */
		public static final String DASH = "-";
		/** 冒号 */
		public static final String COLON = ":";
		/** 下划线 */
		public static final String UDLINE = "_"; 
		/** 百分号 */
		public static final String PERCENT = "%"; 
		
		public static final String AT = "@";

		/** 大于 */
		public static final String GT = ">";
		/** 小于 */
		public static final String LT = "<";

	}
	 
	
	/**
	 *	正则表达式常量
	 */
	public  static class  Regexp{
	
		/** 国内座机 */
		public static final String LANDLINE = "^(\\d{3,4}-|\\d{3,4}-)?\\d{7,8}$";
		/** Email */
		public static final String EMAIL = "：^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$";
		/** 国内身份证 */
		public static final String IDCARD = "^\\d{8,18}|[0-9x]{8,18}|[0-9X]{8,18}?$";
		/** 邮政编码 */
		public static final String POSTCODE = "^[1-9]\\d{5}(?!\\d)$";
		/** IP4 */
		public static final String IP4 = "^((?:(?:25[0-5]|2[0-4]\\d|[01]?\\d?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d?\\d))$";
		/** 帐号(字母开头，允许5-32字节，允许字母数字下划线) */
		public static final String ACOUNT = "^[a-zA-Z][a-zA-Z0-9_]{5,32}$";
		 
		
		/** 实数**/
		public static final String REAL_NUM = "^[-\\+]?[\\d]*$";
		/** 整数(含0)**/
		public static final String INT_NUM = "[\\d]*$";
		/** 小数**/
		public static final String  DECIMAL_NUM  = "[-+]{0,1}\\d+\\.\\d*|[-+]{0,1}\\d*\\.\\d";
		
		
	}
	
	
	/**
	 *	权限相关常量
	 */
	public static class Authority {
		 
		
		/**	权限认证前缀	*/
		public static final String AUTHORITY_PREFIX="ROLE_"; 
		/**	所有权限	*/
		public static final String AUTHORITY_CLAIM_NAME="authorities"; 
		/**	REDIS存放资源与角色IDS关联关系的KEY	*/
		public static final String RESOURCE_ROLEIDS_MAP = "auth:resource_roleids_map";
		/**	REDIS存放 职工ID和职工名称映射关系的KEY	*/
		public static final String EMP_IDNAME_MAP = "auth:emp_idname_map";
		/**	权限认证时header名	*/
		public static final String AUTHORITY_HEADER="Authorization"; 
		
		/**	权限认证时token头	*/
		public static final String AUTH_TOKEN_HEADER="Bearer "; 
		
		public static final String AUTH_USER="user";
		public static final String AUTH_IDENTITY_ID="identityId";  
	 
 
	}
	 
 
	/**
	 * HTTP回话常量
	 */
	public static class HttpSession {

		/** session存放当前用户的KEY */
		public static final String USERINFO = "userInfo";
		/** session存放当前用户权限拥有的菜单ID集合的KEY */
		public static final String MENUS = "menuIds";
		/** session存放当前用户权限拥有的权限编码集合的KEY */
		public static final String PREMISSIONS = "permissions";
		/**请求返回是否是页面的标识KEY*/
		public static final String REQUEST_ISVIEW = "method_return_is_view";
 
	}
	
	
	/**
	 * 	缓存KEY常量
	 */
	public static class Cache {
		
		/** 未知队列 的答复队列的key的名字 */
		public static final String ANSWER_KEYS="answer_keys";
		
		/** queue_fep1队列 的答复队列的key的名字 */
		public static final String FEQ1_ANSWER_KEYS="feq1_answer_keys";

		/** 平台参数key */
		public static final String PLATFROM_PARAM_KEYS="platfrom_param_keys";
 
	}
	 
	
	/**
	 * 	消息提示常量
	 */
	public static class TipMsg {
  
		public static final String OPERATE_SUCCESS = "操作成功!";
		public static final String OPERATE_FAIL = "操作失败!"; 
		
	}

}
